
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
<meta http-equiv="Pragma" content="no-cache"> 
<meta http-equiv="Cache-Control" content="no-cache"> 
<meta http-equiv="Expires" content="0"> 
<title>后台管理</title>
<link href="./css/login.css" rel="stylesheet" type="text/css" />
<script src="./js/jquery-1.11.1.min.js"></script>
<script src="./layui/layui.js"></script>
<script type="text/javascript">
$(function () {
    $("#denglu").click(function () {
        $.getJSON("Hotel"
            , {"action": "login", "userName": $("#userName").val(), "password": $("#password").val()}
            , function (json) {
                if (json > 0) {
                	layer.msg("登录成功");
                    window.location.href = "index.html";
                } else {
                    layer.msg("登陆失败");
                }
            });
    });
});
</script>
</head>

<body>
<div class="login_box">
      <div class="login_l_img"><img src="images/login-img.png" /></div>
      <div class="login">
          <div class="login_logo"><a href="#"><img src="images/login_logo.png" /></a></div>
          <div class="login_name">
               <p>后台管理系统</p>
          </div>
          <form  action="Hotel" method="post">
            
              <input name="userName" type="text" id="userName" value="用户名" onfocus="this.value=''" onblur="if(this.value==''){this.value='用户名'}">
              <span id="password_text" onclick="this.style.display='none';document.getElementById('password').style.display='block';document.getElementById('password').focus().select();">密码</span>
<input name="password" type="password" id="password" style="display:none;" onblur="if(this.value==''){document.getElementById('password_text').style.display='block';this.style.display='none'};"/>
           <input value="登录" style="width:100%;" type="button" id="denglu" >
              
             
          </form>
      </div>
      <div class="copyright">某某有限公司 版权所有©2016-2018 技术支持电话：000-00000000</div>
</div>

</body>
</html>
